# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# pyojo                                           Copyright (c) 2013 nabla.net
# ----------------------------------------------------------------------------
""" Demo helpers.
"""

from pyojo.js.dijit import layout


def new_panel(title, parent):
    panel = layout.ContentPane("panel",
                               title="Demo Button",
                               registered = False,
                               style = "overflow:auto;",
                               closable = True)
    
    panel.call_method_of(parent, "addChild")
    panel.call_method_of(parent, "selectChild")
    return panel